<template>
    <div>
        <p>this is an index page</p>
        <el-button v-on:click="test">button</el-button>
    </div>
</template>

<script>
    export default {
        name: "index",
        methods:{
            test(){
                this.$axios
                    .post('/api/user/test',{})
                    .then(response => {
                        console.log(response.data);
                        this.$message(response.data.message)
                    })
            }
        }
    }
</script>

<style scoped>

</style>